/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author YUga studio
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webbase.modules.invoicing.entity;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webbase.common.persistence.DataEntity;
import com.oplink.webbase.modules.sys.entity.User;
/**
 * 告警Entity
 * @author YUga studio
 * @version 2015-01-12
 */
@Entity
@Table(name = "invoicing_goods_sort")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class GoodsSort extends DataEntity {
	
	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private Integer goodsSortId; // 商品编号
	private String goodsSortName; // 商品编号

    
	  public Integer getGoodsSortId() {
        return goodsSortId;
      }
      
      public void setGoodsSortId(Integer goodsSortId) {
        this.goodsSortId = goodsSortId;
      }
    
	  public String getGoodsSortName() {
        return goodsSortName;
      }
      
      public void setGoodsSortName(String goodsSortName) {
        this.goodsSortName = goodsSortName;
      }
    
    
    // JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	} 
	
	@Transient
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}
}
